import request from "@/utils/request.js";

export class LoginApi {

  //获取验证码
  static getCaptcha() {
    return request({
      url: '/auth/getVerifyCode',
      method: 'post',
      headers: {
        isToken: false
      },
      timeout: 10000
    });
  }

  //登录
  static login(data)   {
    return request({
      url: '/auth/login',
      method: 'post',
      headers: {
        isToken: false
      },
      data: data
    });
  }

  //获取用户信息
  static getUserInfo() {
    return request({
      url: '/auth/getUserInfo',
      method: 'post',
    })
  }

  //登出
  static logout()   {
    return request({
      url: '/auth/logout',
      method: 'post'
    });
  }

  //获取路由
  static getRouters() {
    return request({
      url: '/auth/findRouters',
      method: 'post'
    });
  }
}